//
//  TTRoom.swift
//  TTCoreData
//
//  Created by Toj on 4/19/21.
//

import Foundation

public enum TTRTCMode: Int {
    // 被动拉流
    case passivity = 1
    
    // 主动拉流 -> 视频
    case initiativeVideo = 2
    
    // 主动拉流 -> 音频
    case initiativeAudio = 4
    
    // 主动拉流 -> 音视频
    case initiativeAudioAndVideo = 6
}

open class TTLiveRoom: NSObject {
    
    public var uid: Int = 0
    public var rtcMode: TTRTCMode = .passivity
    
    public var rtcType: TTRTCType = .other
    public var agora: TTRTCAgora?
    public var zego: TTRTCZego?
    
    public var initiatives: [TTUser]?
}

public extension TTLiveRoom {
    var rtc: TTRTC? {
        if rtcType == .agora { return agora }
        if rtcType == .zego { return zego }
        return nil
    }
}
